<%@page import="com.etc.entity.Housing"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
    <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>


<head>
  <meta charset="utf-8">
  <title>首页</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <link rel="stylesheet" href="layui/css/layui.css" media="all">

  <link rel="stylesheet" href="css/style.css">
  <link rel="stylesheet" href="css/common.css">
  <link rel="stylesheet" href="css/myLayui.css">
  <link rel="stylesheet" href="css/mycss.css">

</head>

<body>

  <!-- 导航 -->
  
  <ul class="layui-nav" style="padding-left: 100px;">
    <div class="w">
        <span class="logo"><img src="img/logo.png" alt=""></span>
        <li class="layui-nav-item layui-this"><a href="is.do">首页</a></li>
        <li class="layui-nav-item"><a href="ss.do?op=apartment01">蔡塘悦舍</a></li>
        <li class="layui-nav-item"><a href="ss.do?op=apartment02">悦舍大院</a></li>
        <li class="layui-nav-item"><a href="ss.do?op=apartment03">悦舍阔居</a></li>
        <li class="layui-nav-item"><a href="ts.do?op=query">社区生活</a></li>
        <li class="layui-nav-item"><a href="is.do?op=about">关于悦舍</a></li>
        <li class="layui-nav-item"><a href="is.do?op=aboutus">关于我们</a></li>
        
         
        <c:if test="${sessionScope.username==null}">
       <li class="layui-nav-item user youke" >
          <a href="login.jsp">登录</a>
             </li>
          </c:if>
          
          
          <c:if test="${sessionScope.username!=null}">
        <li class="layui-nav-item user youke" >
                  <a href="us.do?op=queryPerson"><img src="<%=request.getAttribute("personImg") %>" class="layui-nav-img"><%=request.getAttribute("personNickName") %></a>
                  <dl class="layui-nav-child">
                      <dd><a href="us.do?op=queryPerson">个人中心</a></dd>
                      <dd><a href="us.do?op=updpwd1">密码修改</a></dd>
                      <dd><a href="us.do?op=removesession">退出</a></dd>
                  </dl>
         </li>
          </c:if>
           
          
    </div>
 
  </ul>

  <!-- 轮播图 -->
  <div class="layui-carousel" id="test1">
    <div carousel-item>
      <div>
        <img src="http://www.yazhugongyu.com/recouse/upload/image/webimg/5d4af513c9ca444dab3df422120cb981.png" alt="">
      </div>
      <div>
        <img src="http://www.yazhugongyu.com/recouse/upload/image/webimg/b55b53df9eaa407d90ca14f47624ad34.png" alt="">
      </div>
      <div>
        <img src="https://www.52mf.com.cn/static/images/register-bg.jpg" alt="">
      </div>
      <div>
        <img src="https://mofang-cms.oss-cn-shanghai.aliyuncs.com/a46281992f14eea59e88f49d1298f961.jpeg" alt="">
      </div>
    </div>
  </div>

  <div class="home_search">
    <ul class="home_search_t clearfix">
      <li class="home_search_blur"></li>
      <li class="home_search_l">
        <div><span id="homesearchcity">厦门市<i></i></span></div>
        <input placeholder="输入查询" id="search_key" value="">
        <a id="home_search_button" >搜索</a>
        <!-- 模糊搜索下拉列表 -->
        <div class="home_search_list">
          <ul>
            <li class="home_search_li">上海</li>
            <li class="home_search_li">上海</li>
          </ul>
        </div>
      </li>
    </ul>
    <ul class="home_search_other"><span>大家都在搜：</span>
      <a href="is.do?op=searchBypage&strLike=单间">单间</a>
      <a href="is.do?op=searchBypage&strLike=复式">小复式</a>
      <a href="is.do?op=searchBypage&strLike=2居室">2居室</a>
      <a href="is.do?op=searchBypage&strLike=3居室">3居室</a>
      <a href="is.do?op=searchBypage&strLike=套房">套房</a>
    </ul>
    <ul class="home_search_pop js_getcity" tabindex="1"></ul>
  </div>

	
  <!-- 最新房源 -->
  <div class="w">
    <div class="list_new" id="relook">
      <h6>最新房源</h6>
      <ul class="list_new_pe" style="height: 268px;">
        <div class="list_new_po">
          <ul class="clearfix" id="newapa">
			
			<%
			if(request.getAttribute("Housinglist")!=null){
				Object obj=request.getAttribute("Housinglist");
				if(obj instanceof List){
					List<Housing> list=(List<Housing>) obj;
					
					//int i=list.size()-1;i>list.size()-4;i--	
					for( int i=0;i<3;i++){
						System.out.println(list.get(i));

						%>
						    <li brand>
              <div class="">
                <ul class="list_img">
                  <img src="<%=list.get(i).getHsPic01()%>"
                    alt="">
                </ul>
                <dl>
                  <dt><%=list.get(i).getHouseName()%> - <%=list.get(i).getHouseType()%></dt>
                  <dd><i>¥</i><span><%=list.get(i).getHsPrice()%></span>/月</dd>
                </dl>
                <ul class="list_pop">
                  <li>
                    <a  href="is.do?op=detail&housingId=<%=list.get(i).getHsId()%>">点击详情<span>></span></a>               		
                  </li>
                </ul>

              </div>
            </li>
            
						<% 
						
					}

				}
			}
			%>
        
            
          </ul>

        </div>
        <div class="list_new_al list_new_hui"></div>
        <div class="list_new_ar"></div>
      </ul>
    </div>
  </div>

  <!-- 各个公寓 -->
  <div class="bgf9f6f7">
    <div class="w">
      <ul class="home_apa_title">
        <li><i></i>蔡 塘 悦 舍</li>
      </ul>

      <ul class="home_apa_comma clearfix">
        <li class="home_apa_pop">
          <div>
            <ul><img src="https://ac-r.static.booking.cn/images/hotel/max1280x900/164/164391628.jpg" width="390"
                height="255" alt="" title=""></ul>
            <dl class="commma_pop_dl" style="top: 250px;">
              <dt>蔡塘悦舍</dt>
              <dd>人生最美好的停顿</dd>
              <dd style="padding-top:30px;">
                <a href="ss.do?op=apartment02">点击详情</a>
              </dd>
            </dl>
          </div>
        </li>
        <li class="home_apa_common">
          <div>
            <dl>
              <dt><a><img src="https://ac-q.static.booking.cn/images/hotel/max1024x768/164/164389875.jpg" width="390"
                    height="255" alt="" title=""></a></dt>
              <dd>超大客厅嗨在一起</dd>
            </dl>

          </div>
        </li>
        <li class="home_apa_common">
          <div>
            <dl>
              <dt><a><img src="https://ac-q.static.booking.cn/images/hotel/max1280x900/164/164391648.jpg" width="390"
                    height="255" alt="" title=""></a></dt>
              <dd>精致软装贴心生活</dd>
            </dl>
          </div>
        </li>
      </ul>
    </div>
  </div>

  <div class="w">
    <ul class="home_apa_title">
      <li class="icon_qingcao"><i></i>悦 舍 大 院</li>
    </ul>
    <ul class="home_apa_comma clearfix">
      <li class="home_apa_pop">
        <div>
          <ul><img src="https://mofang-cms.oss-cn-shanghai.aliyuncs.com/18367b3d58af9d6fa3c91e1327ef3047.jpeg"
              width="390" height="255" alt="" title=""></ul>
          <dl class="commma_pop_dl" style="top: 250px;">
            <dt>悦舍大院</dt>
            <dd>人生最美好的停顿</dd>
            <dd style="padding-top:30px;">
              <a href="ss.do?op=apartment02">点击详情</a>
            </dd>
          </dl>
        </div>
      </li>
      <li class="home_apa_common">
        <div>
          <dl>
            <dt><a><img src="https://mofang-cms.oss-cn-shanghai.aliyuncs.com/ea7c80f075155643b59e875091b43383.jpeg"
                  width="390" height="255" alt="" title=""></a></dt>
            <dd>超大客厅嗨在一起</dd>
          </dl>

        </div>
      </li>
      <li class="home_apa_common">
        <div>
          <dl>
            <dt><a><img src="http://productimg.52mf.com.cn/crsFX-6-96822.jpg?imageView2/1/w/740/h/415/q/100|imageslim"
                  width="390" height="255" alt="" title=""></a></dt>
            <dd>精致软装贴心生活</dd>
          </dl>
        </div>
      </li>
    </ul>
  </div>

  <div class="bgf9f6f7">
    <div class="w">
      <ul class="home_apa_title">
        <li class="icon_sushe"><i></i>悦 舍 阔 居</li>
      </ul>
      <ul class="home_apa_comma clearfix">
        <li class="home_apa_pop">
          <div>
            <ul><img src="https://mofang-cms.oss-cn-shanghai.aliyuncs.com/6f98b98f620e4aeecadff67799e556e9.jpeg"
                width="390" height="255" alt="" title=""></ul>
            <dl class="commma_pop_dl" style="top: 250px;">
              <dt>悦舍阔居</dt>
              <dd>人生最美好的停顿</dd>
              <dd style="padding-top:30px;">

                <a href="ss.do?op=apartment03">点击详情</a>
              </dd>
            </dl>
          </div>
        </li>
        <li class="home_apa_common">
          <div>
            <dl>
              <dt><a><img src="https://mofang-cms.oss-cn-shanghai.aliyuncs.com/edd211100cf299b7cef32ef3f87878e9.jpeg"
                    width="390" height="255" alt="" title=""></a></dt>
              <dd>超大客厅嗨在一起</dd>
            </dl>

          </div>
        </li>
        <li class="home_apa_common">
          <div>
            <dl>
              <dt><a><img
                    src="http://www.yazhugongyu.com/recouse/upload/image/webimg/c72a684cc030466e86c90b92318a9cc1.jpg"
                    width="390" height="255" alt="" title=""></a></dt>
              <dd>精致软装贴心生活</dd>
            </dl>
          </div>
        </li>
      </ul>
    </div>
  </div>

  <!-- 在这里我们提供 -->
  <div class="w">
    <ul class="home_apa_service_title">
      <li>在这里我们提供</li>
    </ul>
    <ul class="home_apa_service clearfix">
      <div>
        <h6>扫公众号</h6>
        <p></p>
      </div>
      <dl>
        <span><img src="img/service01.png" alt=""></span>
        <dt>维修服务</dt>
      </dl>
      <dl class="icon_bj">
        <span><img src="img/service02.png" alt=""></span>
        <dt>保洁服务</dt>
      </dl>
      <dl class="icon_ts">
        <span><img src="img/service03.png" alt=""></span>
        <dt>投诉服务</dt>
      </dl>
    </ul>
  </div>

  <!-- footer -->
  <div class="footerbg mt80">
    <div class="w footer">
      <ul class="footer_top clearfix">
        <div class="f_logo"><img src="img/logo_01.png"></div>
        <dl class="f_time">
          <dt>400-920-3805</dt>
          <dd>服务时间：工作日</dd>
          <dd>服务时间：9:30-18:00</dd>
        </dl>
        <div class="f_ewm">
          <dl>
            <dt><img
                src="https://gss0.bdstatic.com/94o3dSag_xI4khGkpoWK1HF6hhy/baike/c0%3Dbaike80%2C5%2C5%2C80%2C26/sign=fa9140accd95d143ce7bec711299e967/2934349b033b5bb571dc8c5133d3d539b600bc12.jpg">
            </dt>
            <dd>下载app</dd>
          </dl>
          <dl>
            <dt><img
                src="https://gss0.bdstatic.com/94o3dSag_xI4khGkpoWK1HF6hhy/baike/c0%3Dbaike80%2C5%2C5%2C80%2C26/sign=fa9140accd95d143ce7bec711299e967/2934349b033b5bb571dc8c5133d3d539b600bc12.jpg">
            </dt>
            <dd>关注微信</dd>
          </dl>
          <dl>
            <dt><img
                src="https://gss0.bdstatic.com/94o3dSag_xI4khGkpoWK1HF6hhy/baike/c0%3Dbaike80%2C5%2C5%2C80%2C26/sign=fa9140accd95d143ce7bec711299e967/2934349b033b5bb571dc8c5133d3d539b600bc12.jpg">
            </dt>
            <dd>关注微博</dd>
          </dl>
        </div>
        <div class="f_menu">
          <dl>
            <dt>常见问题</dt>
            <dd><a href="#">预约预定</a></dd>
            <dd><a href="#">入住需知</a></dd>
            <dd><a href="#">租期服务</a></dd>
            <dd><a href="#">缴费须知</a></dd>
          </dl>
          <dl>
            <dt>关于我们</dt>
            <dd><a href="#">悦舍故事</a></dd>
            <dd><a href="#">悦舍文化</a></dd>
            <dd><a href="#">悦舍大事记</a></dd>
            <dd><a href="#">悦舍品牌</a></dd>
          </dl>
          <dl>
            <dt>活动介绍</dt>
            <dd><a href="#">线上活动</a></dd>
            <dd><a href="#">线下活动</a></dd>
          </dl>
        </div>
      </ul>
      <ul class="copyright"> © 2019 YUESHE All Rights reserved. 悦舍生活（厦门）有限公司</ul>
    </div>
  </div>


  </div>
  <!-- 
<script src="js/jquery-1.8.3.min.js"></script>
<script src="js/handlebars.js"></script>
<script src="js/jquery.cookie.js"></script>
<script src="js/json2.js"></script> -->
  <script src="layui/layui.js" charset="utf-8"></script>
  <script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.js"></script>
  <!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->
  <script>
    layui.use('element', function () {
      var element = layui.element; //导航的hover效果、二级菜单等功能，需要依赖element模块
      //监听导航点击
      element.on('.layui-nav', function (elem) {
        //console.log(elem)
        layer.msg(elem.text());
      });
    });
  </script>
  <script>
    // 轮播图
    layui.use('carousel', function () {
      var carousel = layui.carousel;
      //建造实例
      carousel.render({
        elem: '#test1'
        , width: '80%' //设置容器宽度
        , arrow: 'always' //始终显示箭头
        , height: '462px'
        //,anim: 'updown' //切换动画方式
      });
    });

  </script>

  <script>
    $("#newapa li div").on({
      mouseover: function () {
        $(this).addClass("hs_on")
      },
      mouseout: function () {
        $(this).removeClass("hs_on")
      }
    })

    $(".home_apa_pop").on({
      mouseover: function () {
        $(this).children('div').children('dl').css('top', '0')
      },
      mouseout: function () {
        $(".commma_pop_dl").css('top', '255px')
      }
    })
    
    $("#home_search_button").click(function(){
    	console.log(11)
    	if($('#search_key').val()==""){
     		$(this).prop('href',"is.do?op=searchBypage")
    		console.log(123)
    	} 
     	else{
    		$(this).prop('href',"is.do?op=searchBypage&strLike="+$('#search_key').val())
    	} 
    })
  </script>
  <script> 
		
		  
		  
		  
 </script>
</body>

</html>